<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
    <link rel="stylesheet" href="css/layer.css" />
    <link rel="stylesheet" href="css/style.css" />
	<link rel="icon" href="images/favicon.png">
</head>
<body>
	<header class="mui-bar mui-bar-nav">
		<a class="back_a">
			<img src="images/back.png"/>
		</a>
		<span class="mui-title"></sapn>
	</header>
	<div class="team_all">
		<div class="tit_left">
			<div class="tit_img">
				<img src="images/team_left.png"/>
			</div>
			<span class="team_white">成员信息</span>
		</div>
		<div class="tit_right">
			<div class="right_white">一星及以上人数：<span class="right_num"></span></div>
		</div>
	</div>
	<!--<div class="team_div">
		<div class="team_left">
			<img src="images/team_per.png"/>
		</div>
		<div class="team_center_tent">
			<p class="apply_op team_op">昵称：<span class="apply_vip">111</span></p>
			<p class="apply_op team_op">手机号码：<span class="apply_phone">15188331361</span></p>
			<p class="apply_op team_op">微信号：<span class="apply_wx">111</span></p>
		</div>
		<div class="team_right">普通会员</div>
	</div>-->
</body>
<script type="text/javascript" src="js/jquery.js" ></script>
<script type="text/javascript" src="js/layer.js" ></script>
<script type="text/javascript">
    //返回上一级
    $(".back_a").click(function(){

        window.location.href ="/index";
    })

	$(function () {
        var storage=window.localStorage;
        var token=storage.token;
        if(token==undefined){
            window.location.href = "/"
        }
        $.ajax({
            type: "POST",
            url: "/users/promote/team?token="+token+"&page_num=0",
            success: function (data) {
                if (data.code && data.code==='success') {
                    $(".mui-title").append("我的团队(<i class=\"team_i\">"+data.data.total+"</i>人)")
                    $(".right_num").append(data.data.count);
					for(var i=0;i<data.data.rows.length;i++){
                        $(".team_all").after("<div class=\"team_div\">\n" +
                            "\t\t\t<div class=\"team_left\">\n" +
                            "\t\t\t\t<img src=\"images/team_per.png\"/>\n" +
                            "\t\t\t</div>\n" +
                            "\t\t\t<div class=\"team_center_tent\">\n" +
                            "\t\t\t\t<p class=\"apply_op team_op\">姓名：<span class=\"apply_vip\">"+data.data.rows[i].userName+"</span></p>\n" +
                            "\t\t\t\t<p class=\"apply_op team_op\">手机号码：<span class=\"apply_phone\">"+data.data.rows[i].mobileNumber+"</span></p>\n" +
                            "\t\t\t\t<p class=\"apply_op team_op\">微信号：<span class=\"apply_wx\">"+data.data.rows[i].weChat+"</span></p>\n" +
                            "\t\t\t</div>\n" +
                            "\t\t\t<div class=\"team_right\">"+data.data.rows[i].identityName+"</div>\n" +
                            "\t\t</div>")
					}
                } else {
                    layer.msg(data.message+"，请重试",{icon:2,time:1000});
                }
            },
            error: function (data) {
                if(data.code==undefined){
                    layer.msg("登录失效",{icon:2,time:1000});
                    window.location.href ="/";
                }
                layer.msg(data.message,{icon:2,time:1000});
            }
        });
    })
</script>
</html>